Optimal. Leaf size=29 \[ \frac{\sin ^5(x)}{5}-\frac{1}{5} i \cos ^5(x)+\frac{1}{3} i \cos ^3(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.136883, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {3518, 3108, 3107, 2565, 14, 2564, 30} \[ \frac{\sin ^5(x)}{5}-\frac{1}{5} i \cos ^5(x)+\frac{1}{3} i \cos ^3(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3518
Rule 3108
Rule 3107
Rule 2565
Rule 14
Rule 2564
Rule 30
Rubi steps
\begin{align*} \int \frac{\sin ^3(x)}{i+\tan (x)} \, dx &=\int \frac{\cos (x) \sin ^3(x)}{i \cos (x)+\sin (x)} \, dx\\ &=-\left (i \int \cos (x) (\cos (x)+i \sin (x)) \sin ^3(x) \, dx\right )\\ &=-\left (i \int \left (\cos ^2(x) \sin ^3(x)+i \cos (x) \sin ^4(x)\right ) \, dx\right )\\ &=-\left (i \int \cos ^2(x) \sin ^3(x) \, dx\right )+\int \cos (x) \sin ^4(x) \, dx\\ &=i \operatorname{Subst}\left (\int x^2 \left (1-x^2\right ) \, dx,x,\cos (x)\right )+\operatorname{Subst}\left (\int x^4 \, dx,x,\sin (x)\right )\\ &=\frac{\sin ^5(x)}{5}+i \operatorname{Subst}\left (\int \left (x^2-x^4\right ) \, dx,x,\cos (x)\right )\\ &=\frac{1}{3} i \cos ^3(x)-\frac{1}{5} i \cos ^5(x)+\frac{\sin ^5(x)}{5}\\ \end{align*}
Mathematica [A] time = 0.019013, size = 51, normalized size = 1.76 \[ \frac{\sin (x)}{8}-\frac{1}{16} \sin (3 x)+\frac{1}{80} \sin (5 x)+\frac{1}{8} i \cos (x)+\frac{1}{48} i \cos (3 x)-\frac{1}{80} i \cos (5 x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.051, size = 81, normalized size = 2.8 \begin{align*}{-{\frac{i}{4}} \left ( \tan \left ({\frac{x}{2}} \right ) -i \right ) ^{-2}}+{\frac{1}{6} \left ( \tan \left ({\frac{x}{2}} \right ) -i \right ) ^{-3}}+{\frac{1}{8} \left ( \tan \left ({\frac{x}{2}} \right ) -i \right ) ^{-1}}+{i \left ( \tan \left ({\frac{x}{2}} \right ) +i \right ) ^{-4}}+{\frac{2}{5} \left ( \tan \left ({\frac{x}{2}} \right ) +i \right ) ^{-5}}-{\frac{2}{3} \left ( \tan \left ({\frac{x}{2}} \right ) +i \right ) ^{-3}}-{\frac{1}{8} \left ( \tan \left ({\frac{x}{2}} \right ) +i \right ) ^{-1}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.06113, size = 101, normalized size = 3.48 \begin{align*} \frac{1}{240} \,{\left (-3 i \, e^{\left (8 i \, x\right )} + 10 i \, e^{\left (6 i \, x\right )} + 30 i \, e^{\left (2 i \, x\right )} - 5 i\right )} e^{\left (-3 i \, x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.289148, size = 37, normalized size = 1.28 \begin{align*} - \frac{i e^{5 i x}}{80} + \frac{i e^{3 i x}}{24} + \frac{i e^{- i x}}{8} - \frac{i e^{- 3 i x}}{48} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.29783, size = 96, normalized size = 3.31 \begin{align*} -\frac{-3 i \, \tan \left (\frac{1}{2} \, x\right )^{2} - 12 \, \tan \left (\frac{1}{2} \, x\right ) + 5 i}{24 \,{\left (-i \, \tan \left (\frac{1}{2} \, x\right ) - 1\right )}^{3}} - \frac{15 \, \tan \left (\frac{1}{2} \, x\right )^{4} + 60 i \, \tan \left (\frac{1}{2} \, x\right )^{3} - 10 \, \tan \left (\frac{1}{2} \, x\right )^{2} - 20 i \, \tan \left (\frac{1}{2} \, x\right ) + 7}{120 \,{\left (\tan \left (\frac{1}{2} \, x\right ) + i\right )}^{5}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]